package com.tally.server.dto;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

public class LoginDTO {
    private Integer userId;

    private String ipAddr;

    @JsonFormat(pattern="yyyy.MM.dd HH:mm",timezone = "GMT+8")
    private Date loginTime;

    private String os;

    private String device;

    private String addr;

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getIpAddr() {
        return ipAddr;
    }

    public void setIpAddr(String ipAddr) {
        this.ipAddr = ipAddr;
    }

    public Date getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

    public String getOs() {
        return os;
    }

    public void setOs(String os) {
        this.os = os;
    }

    public String getDevice() {
        return device;
    }

    public void setDevice(String device) {
        this.device = device;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("LoginDTO{");
        sb.append("userId=").append(userId);
        sb.append(", ipAddr='").append(ipAddr).append('\'');
        sb.append(", loginTime=").append(loginTime);
        sb.append(", os='").append(os).append('\'');
        sb.append(", device='").append(device).append('\'');
        sb.append(", addr='").append(addr).append('\'');
        sb.append('}');
        return sb.toString();
    }
}